package com.ymx.darling.spring;

import com.ymx.darling.session.Session;
import org.springframework.transaction.support.ResourceHolderSupport;
import org.springframework.util.Assert;

/**
 * @author 爱Java的小于
 */
public class SessionHolder extends ResourceHolderSupport {
    private final Session session;

    public SessionHolder(Session session) {
        Assert.notNull(session, "Session 不能等于null");
        this.session = session;
    }

    public Session getSession() {
        return this.session;
    }
}
